Skip to content

feat: gate worker job admission on disk headroom - #191

Merged
Nickfost merged 4 commits into
mainfrom
t3/low-disk-job-guard
Nov 24, 2026
Merged

Nickfost merged 4 commits into
mainfrom
t3/low-disk-job-guard

Conversation

@Nickfost

@Nickfost Nickfost commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

The worker now advertises zero capacity, skips new offers, and stops creating runners when any monitored filesystem reaches 90% unavailable space or falls below 10 GiB available. It still processes active-job starts, completions, and cleanup. Admission resumes when every filesystem is at most 85% used with at least 15 GiB available. The same percentage thresholds cover inode use.

The existing capacity timer measures Docker storage, the runner workspace, and the Docker upload spool while the worker is idle or busy. Local controller status reports low_disk with the triggering limit, capacity, and available bytes. The manager prepares a dedicated read-only export for the controller.

Refs #166. Adoption guidance is tracked in template #49.

Verification

  • Reproduced acquisition during disk pressure with the prior controller. The patched listener fixture passed with zero advertised capacity, zero acquisitions, and one completed runner cleanup. The recovery fixture restored configured capacity and runner creation at the recovery boundary. The disk admission Go tests passed with race detection.
  • The 15 sampler tests, 27 portable image lifecycle tests, 15 validation task tests, and uninstall transaction fixture passed. Commit conventions, the committed-tree secret scan, and documentation links passed.
  • The full hosted suite passed at 6a05267. This branch now includes main at 461a707, so the hosted suite and Codex review will run on the new head. The isolated installer and proxy-health fixtures reproduced and verified the correction for the Compose test environment. The correction keeps the protected export ownership and mode checks.

Before rollout

Confirm that zero-capacity polls prevent new direct assignments to prewarmed runners and that GitHub re-offers jobs whose messages were acknowledged during the block. The SDK documents unacknowledged message replay. The contract for acknowledged offers remains open. Upstream discussion

Documentation

The disk admission guide covers thresholds, local status, storage layout, manager staging, rollback, and the remaining service checks. Updated the controller design, architecture, host enrollment, and monitoring guides and linked the earlier observation record.

Sample Docker, workspace, and spool filesystem headroom. Advertise zero capacity, skip new acquisitions, and suppress runner creation during pressure while handling active-job callbacks. Restore admission with hysteresis and expose local disk status.
@Nickfost
Nickfost marked this pull request as ready for review November 24, 2026 09:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T09:44:28.551631Z 430678d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Nickfost
Nickfost merged commit 9d33814 into main Nov 24, 2026
3 of 4 checks passed
@Nickfost
Nickfost deleted the t3/low-disk-job-guard branch November 24, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant